package com.ls.kdlss.util;

import android.app.Activity;
import android.os.CountDownTimer;
import android.support.annotation.UiThread;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

import java.io.IOException;

import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;

/**
 * Created by Administrator on 2016/11/16.
 */

public class OKUtil {

    private OkHttpClient client;
    private String TAG = "OKUtilshttp";

    /**
     * 无参
     **/
    public void okNoreference(String url) {
        String jsons = "no";
        client = new OkHttpClient();
        Request request = new Request.Builder().url(url).build();
        Log.e(TAG, "进入了方法");
        client.newCall(request).enqueue(new Callback() {
            @Override
            public void onFailure(okhttp3.Call call, IOException e) {

            }

            @Override
            public void onResponse(okhttp3.Call call, final Response response) throws IOException {


                response.body().string();

            }
        });


    }


    interface Calls {
        public void calls(String body);
    }


}

